package utils;

import java.util.ArrayList;
import org.biojava.bio.structure.AminoAcid;
import org.biojava.bio.structure.Atom;

/**
*  Class for manage the cells of the objects aminoacids extended in the grid
*  @author Brizuela C.A., Beltran A., Zatarain H.
*  @version 1.0.0
*/
public class AminoacidExtended {
    //The object aminoacid
    private AminoAcid aminoacid;
    //The central atom of the aminoacid (the beta carbon for all except for GLY)
    private Atom centralAtom;
    //The side chain atom more distant from the central atom
    private Atom moreDistantAtom;
    //the distance between central atom and the more distant atom
    private double ratio;
    //the cell identifier where the aminoacid belongs in the Grid
    private String cellId;
    //the rotamer frequency of the aminoacid
    private double frequencyRot;
    
    //empty constructor
    public AminoacidExtended(){
        centralAtom = null;
        moreDistantAtom = null;
        cellId = "";
        ratio = 0;
        frequencyRot = 0;
    }
    
    //constructor with parameters
    public AminoacidExtended(AminoAcid aminoacid, Atom centralAtom, Atom moreDistantAtom, double ratio, String cellId, double frequencyRot){
        this.aminoacid = aminoacid;
        this.centralAtom = centralAtom;
        this.moreDistantAtom = moreDistantAtom;
        this.ratio = ratio;
        this.cellId = cellId;
        this.frequencyRot = frequencyRot;
    }
    
    public void setAminoacid(AminoAcid aminoacid){
        this.aminoacid = aminoacid;
    }
    
    public void setCentralAtom(Atom centralAtom){
        this.centralAtom = centralAtom;
    }
    
    public void setMoreDistantCoords(Atom moreDistantAtom){
        this.moreDistantAtom = moreDistantAtom;
    }
    
    public void setRatio(double ratio){
        this.ratio = ratio;
    }
    
    public void setCellId(String cellId){
        this.cellId = cellId;
    }
        
    public void setFrequency(double frequencyRot){
        this.frequencyRot = frequencyRot;
    }
    
    public AminoAcid getAminoacid(){
        return this.aminoacid;
    }
    
    public Atom getCentralAtom(){
        return this.centralAtom;
    }
    
    public double[] getCoords(){
        return this.centralAtom.getCoords();
    }
    
    public Atom getMoreDistantCoords(){
        return this.moreDistantAtom;
    }
    
    public double getRatio(){
        return this.ratio;
    }
    
    public String getCellId(){
        return this.cellId;
    }
    
    public double getFrequency(){
        return frequencyRot;
    }
}
